package com.backend.demo1.mapper;

import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.backend.demo1.models.User;

@Mapper
public interface UserMapper {

    User selectUserById(@Param("id") Long id);

    void insertUser(User user);

    User findByUsername(@Param("username") String username);

    Map<String, Object> findUserWithRoleName(@Param("username") String username);

    Long findUserIdByUsername(@Param("username") String username);

    void updateRole(@Param("user") User user);

    // 其他 CRUD 方法
}